<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">

<head th:include="include :: header"></head>
<style>
    #brand .closeBtn{
        display: inline-block;
        margin-right: 25px;
        margin-bottom: 25px;
    }
</style>
<!--    培训详情 -->

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">

                        <input type="hidden" id="id" name="id" th:value="${examRegistrationDO.id}">

                        <div class="form-group">
                            <label class="col-sm-3 control-label">培训类型：</label>
                            <div class="col-sm-8">
                                <div th:text="${examRegistrationDO.examType}" class="form-control"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">培训标题：</label>
                            <div class="col-sm-8">
                                <div class="form-control" th:text="${examRegistrationDO.noticeTitle}"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">文件号：</label>
                            <div class="col-sm-8">
                                <div class="form-control" th:text="${examRegistrationDO.fileNumber}"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">培训总人数：</label>
                            <div class="col-sm-8">
                                <div class="form-control"  th:text="${examRegistrationDO.totalTrainees}"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">报名时间：</label>
                            <div class="col-sm-8">

                                <div class="layui-input-inline">
                                    <div class="form-control"  th:text="${examRegistrationDO.registrationStartDate}"></div>
                                </div>
                                ~
                                <div class="layui-input-inline">
                                    <div class="form-control"  th:text="${examRegistrationDO.registrationEndDate}"></div>
                                </div>

                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">班会时间：</label>
                            <div class="col-sm-8">
                                <div class="form-control"  th:text="${examRegistrationDO.classMeetingDate}"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">培训时间：</label>
                            <div class="col-sm-8">
                                <div class="layui-input-inline">
                                    <div class="form-control"  th:text="${examRegistrationDO.trainingStartDate}"></div>
                                </div>
                                ~
                                <div class="layui-input-inline">
                                    <div class="form-control"  th:text="${examRegistrationDO.trainingEndDate}" id="trainingEndDate"></div>
                                </div>

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">结业时间：</label>
                            <div class="col-sm-8">
                                <div class="form-control"  th:text="${examRegistrationDO.graduationDate}" ></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">班主任：</label>
                            <div class="col-sm-8">
                                <div class="form-control" th:text="${examRegistrationDO.classTeacher}"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">联系方式：</label>
                            <div class="col-sm-8">
                                <div class="form-control"  th:text="${examRegistrationDO.teacherPhone}"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">培训形式：</label>

                            <div class="col-sm-8">
                                <div class="form-control" th:if="${examRegistrationDO.trainingForm == '1'}">线上培训</div>
                                <div class="form-control" th:if="${examRegistrationDO.trainingForm == '2'}">线下培训</div>
                            </div>

                        </div>

                        <div class="form-group" id="address" th:if="${examRegistrationDO.trainingAddress != ''}">
                            <label class="col-sm-3 control-label">培训地址：</label>
                            <div class="col-sm-8">
                                <div id="trainingAddress" class="form-control" th:text="${examRegistrationDO.trainingAddress}"></div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">培训形式说明：</label>
                            <div class="col-sm-8">
                                <input id="trainingExplain" name="trainingExplain" type="hidden" th:value="${examRegistrationDO.trainingExplain}">
                                <div class="ibox-content no-padding">
                                    <div id="trainingForm_sn" class="brandCharacteristics editor"></div>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">培训介绍：</label>
                            <div class="col-sm-8">
                                <input id="examIntro" name="examIntro" type="hidden" th:value="${examRegistrationDO.examIntro}">
                                <div class="ibox-content no-padding">
                                    <div id="content_sn" class="brandCharacteristics editor"></div>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">栏目图：</label>
                            <div class="col-sm-8">

                                <div id="columnPictureImg" >
                                    <div class="closeBtn" th:if="${examRegistrationDO.columnPicture != ''}">
                                        <img class="upImg" th:src="${examRegistrationDO.columnPicture}" width="95"/>
                                    </div>
                                </div>

                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">附件：</label>
                            <div class="col-sm-8">

                                <div id="brand"></div>

                                <input type="hidden" id="fileList" th:value="${list}">

                            </div>
                        </div>

                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script src="//s.xlongwei.com/res/js/My97DatePicker/WdatePicker.js"></script></script>
<script type="text/javascript" src="/js/webJs/jzweb/examRegistration/add.js"></script>
<script>
    let fileName = $("#fileList").val(), fileStr = '' ;
    fileName = JSON.parse(fileName);
    fileName.forEach(function (v){
        if( v.trainingPdf != '' && v.fileName != '' ){
            fileStr += `
                <div class="closeBtn">
                    <a href="${v.trainingPdf}" target="_blank">
                        <img class="upImg" src="../../../img/pdf.png" width="95"/>
                        <p>${v.fileName}</p>
                    </a>
                </div>
            `;
        }
    })
    $("#brand").html(fileStr);
</script>

</body>

</html>